module.exports = {
  assetsDir: 'school',
  publicPath: process.env.NODE_ENV === 'production' ?
    'https://cdn.hterobot.com/vue/' : '/',
  pages: {
    school: {
      entry: 'src/school/main.js',
      template: 'public/school.html',
      filename: 'school.html',
    },
  },
  pluginOptions: {
    i18n: {
      locale: 'zh-cn',
      fallbackLocale: 'zh-cn',
      localeDir: 'locales',
      enableInSFC: false
    }
  },
  devServer: {
    proxy: {
      '/': {
        // 目标 API 地址
        target: 'http://localhost:7001/',
        // target: 'http://vip.hterobot.com/',
        // target: 'http://node.hterobot.com/',
        // 如果要代理 websockets
        ws: false,
        // 将主机标头的原点更改为目标URL
        changeOrigin: true
      }
    }
  },
}
